package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @program: springs-study
 * @description:
 * @author: 陈恩涛
 * @create: 2020-07-07 07:51
 **/
//等价于<bean id="user" class="com.kuang.pojo.User"/>
//@Component组件
@Component
@Scope("singleton")
//@Scope("prototype")
public class User {
//    相当于<property name="name" value="小宝"/>
    @Value("小宝")
    public String name;

    public void setName(String name) {
        this.name = name;
    }
}
